package cn.bonoon.controllers;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.bonoon.kernel.events.PanelEvent;
import cn.bonoon.kernel.menus.ItemInfo;
import cn.bonoon.kernel.web.controllers.AbstractPanelController;
import cn.bonoon.kernel.web.models.PanelModel;
import cn.bonoon.kernel.web.resources.StandardResourceRepository;

@Controller
@RequestMapping("s/sys/information")
public class InformationController extends AbstractPanelController{
	
	private final Map<String, StandardResourceRepository> resources = new ConcurrentHashMap<>();
	
//	@Autowired
//	private StandardAutoManager autoManager;
	
	@Override
	protected void onLoad(PanelEvent event) throws Exception {
		PanelModel model = event.getModel();
		StandardResourceRepository srr = resources.get(model.getMid());
		if(null == srr){
			ItemInfo item = (ItemInfo)event.getItem();
			if(null == item){
				throw new Exception("没有对象！");
			}
			
		}
	}

}
